Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.5 KiB

  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!-- simple xslt file: sce-rollback-inf.xsl -->
  3. <xsl:stylesheet
  4. version="1.0"
  5. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  6. xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  7. xmlns:ssr="http://microsoft.com/sce/ssr"
  8. >
  9. <xsl:import href="../CommonLib/ExtFunctions.xsl"/>
  10. <xsl:output method="text" indent="no"/>
  11. <msxsl:script language="JScript" implements-prefix="ssr">
  12. <!-- do not analyze xml syntax -->
  13. <![CDATA[
  14. function CreateRbkTemplate (InFilePath, OutFilePath, LogFilePath)
  15. {
  16. try
  17. {
  18. var SCEAgent = new ActiveXObject("Ssr.SCEAgent");
  19. SCEAgent.CreateRollbackTemplate(InFilePath, OutFilePath, LogFilePath);
  20. return 1;
  21. }
  22. catch (e)
  23. {
  24. return e;
  25. }
  26. }
  27. ]]>
  28. </msxsl:script>
  29. <xsl:template match="/SSRSecurityPolicy/Services">
  30. <xsl:variable name="CfgInf" select="ssr:GetFileLocation('Configure', 'SCE.inf')"/>
  31. <xsl:variable name="RbkInf" select="ssr:GetFileLocation('Rollback', 'SCE.inf')"/>
  32. <xsl:variable name="Rbklog" select="ssr:GetFileLocation('Rollback', 'SCE-Rollback.log')"/>
  33. 'rollback template is <xsl:value-of select="$RbkInf"/>
  34. DIM RbkTempCreated
  35. RbkTempCreated = <xsl:value-of select="ssr:CreateRbkTemplate($CfgInf, $RbkInf, $Rbklog)"/>
  36. If RbkTempCreated &lt;&gt; 0 Then
  37. WScript.Echo "Rollback template failed to be created. Quit"
  38. WScript.Quit 1
  39. End If
  40. </xsl:template>
  41. </xsl:stylesheet>